//
//  AboutHeader.swift
//  ShiZhe
//
//  Created by 陈卿伟 on 16/9/12.
//  Copyright © 2016年 陈卿伟. All rights reserved.
//

import UIKit

class AboutHeader: UIView {
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.createLogo()
        self.creatVersion()
        self.createHintLabel()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //创建logo
    func createLogo(){
        let logoImage = UIImageView(frame: CGRect(x: 148*SCALEW, y: 30*SCALEH, width: 80*SCALEW, height: 80*SCALEW))
        logoImage.image = UIImage(named: "APPIcon")
        self.addSubview(logoImage)
    }
    
    //创建版本信息
    func creatVersion(){
        let versionLabel = UILabel(frame: CGRect(x: 0,y: 123*SCALEH,width: WidthAPP,height: 17*SCALEH))
        versionLabel.textAlignment = .Center
        versionLabel.text = "1.0"
        versionLabel.textColor = UIColor.blackColor()
        versionLabel.font = BaseFunc.getSystemFont(16)
        self.addSubview(versionLabel)
    }
    
    //创建说明文字
    func createHintLabel(){
        let hintLabel = UILabel(frame: CGRect(x: 51*SCALEW,y: 147*SCALEH,width: 274*SCALEW,height: 60*SCALEH))
        hintLabel.textColor = Theme.GrayColor
        hintLabel.textAlignment = .Center
        hintLabel.text = "山人行，众多大牛为你答疑解惑。每一次回答，都是对你所问领域的一次总结。要知道，山人行，必有我师，还有妙计!"
        hintLabel.font = BaseFunc.getLightFont(14)
        hintLabel.numberOfLines = 3
        self.addSubview(hintLabel)
    }

}
